The SMTPGate is a CommuniGate communication module supporting E-mail message transfer using the SMTP and ESMTP Internet protocols (RFC821, RFC1425) via TCP/IP networks. Besides, it supports receiving E-mail even via dial-up connections - by means of wake-up E-mails and/or the Remote Queue Starting procedure described in RFC1985 (in both client and server modes). MIME (RFC 1341) support and various attachment encoding methods are provided within the CommuniGate Server kernel itself.
The SMTPGate module supports multi-stream communications, and it can send messages to and receive messages from several other hosts simultaneously.
The SMTPGate module can work together with POPGate module providing complete TCP/IP Internet E-mail services.
The SMTPGate module can work together with UUCPGate module providing both TCP/IP and UUCP Internet E-mail. The CommuniGate Router takes care of directing messages to the proper gate.
The latest version of the SMTPGate can be obtained from:
http://www.stalker.com
or
ftp://ftp.stalker.com
Installation
Place the SMTPGate module into the Modules folder inside the CommuniGate Folder in your System Folder. If you use a MacPPP link to Internet, make sure the TCP Agent applet is placed in the Modules folder, too. Restart the CommuniGate Server. If you do not use the FreePPP/MacPPP software, make sure its PPP module is NOT installed in the System Folder.
Using Dial-up Connections
If you use a dial-up link, you may want restrict the TCP/IP activity of your server (by means of the TCP Schedule settings). If you send a message with a recipient marked as a "High Priority" one, the system tries to establish a TCP/IP link and to send that message immediately, even if the TCP/IP activity schedule does not allow for new links at that time.
Sometimes you may want to receive incoming mail via SMTP, even if you have a dial-up connection (usually the POPGate is used to receive mail via dial-up links). You should specify how often the SMTPGate should establish TCP/IP links to retrieve incoming mail. Select the Send Wakeup E-mail or Start Remote Queue option and specify the time interval.
If you select the Send Wakeup E-mail option, the SMTPGate will send dummy messages to the specified E-mail address (usually this is a special address on your provider host). This not only forces your dial-up TCP software to establish a TCP link, but can be used to force your provider host to start sending you the messages it has collected while your Server was not linked to the Internet. Consult with your provider about the E-mail address you should use for wake-up.
If your provider system supports "Remote Queue Starting" (RFC1985), then you may select the "Start Remote Queue" option and specify the name of the host that collects mail while your system is down (it's usually your provider mail host). The SMTPGate will contact that host in specified intervals and it will issue the special command to release all your suspended messages in that server queues, so that server starts sending the collected messages to you immediately. Consult with your provider if they support this option.
Using Foreign Mail Servers
The SMTPGate module can use an external, "foreign" mail server (the mode most of other Macintosh E-mail packages use), or it can deliver messages directly, using the DNR services.
When a foreign mail server is used, SMTPGate connects to it and sends all messages from its queue to that host. Since such foreign mail server host is usually "close" to your server, messages are sent quickly. But this method can cause additional delays in message delivery, since messages are queued on the foreign server and those queues can be processed slowly. The Foreign Mail Server method is recommended when your server is connected to Internet via dial-up lines (using PPP or SLIP protocols) and you want messages to leave your server as soon as possible to keep the connection time short.
The DNR (Domain Name Resolver) method is one used in "real" mail systems. For each message and address in its queue, the SMTPGate uses DNS (domain name servers) to get the name and address of the host to send the message to. It can be the destination host itself, or some relay host. The information about the proper relay host is stored in so-called MX records on Domain Name Servers. For each destination host several records can exist, each record having a priority value. If the relay host with the highest priority is not answering, other MX records are used and other relay hosts are tried. If no relay host is available, the message remains in the SMTPGate queue, and the next attempt to deliver it (and all other messages to the same host) is made later.
This method allows to deliver a message either directly to the recipient computer or to a relay host that is "very close" to the recipient computer. Recipients can read your messages almost immediately, and your messaging system does not rely on some "foreign mail server" performance.
Unfortunately, the "Get MX" function is not properly implemented in MacTCP, so the DNR method is disabled when the old MacTCP is installed. The Open Transport TCP does implement DNR functions correctly and the "Using Open Transport DNR" option is enabled for OT-equipped servers.
Note: when a domain address is specified as an IP address, i.e. user@[12.34.56.78], the SMTPGate delivers messages directly to the host with the IP address 12.34.56.78, even if the "Foreign mail server" option is in use. You may want to use it for delivery between several CommuniGate (or other) mail servers on your LAN, if the LAN does not have its own Domain Name Server, or if you use several servers with the old MacTCP software.
Configuring
After the SMTPGate module is placed in the Modules folder on the Server computer, you can configure it from any workstation that has the "can configure" privilege.
• Choose SMTPGate from the Monitor section of the Server menu. The SMTPGate Monitor window appears.
• Choose Service Settings from the SMTPGate menu.
• In the Sending Options, select if you want to deliver messages directly to the recipients (using the DNR services of Open Transport), or you want to use a foreign mail server (to keep the message transfer time short). In the later case, enter the domain name of the foreign mail server (usually, it is the domain name of your network provider host).
• In the Sending Options, set the Channels to Use option. This option limits the number of outgoing SMTP connections the SMTPGate can make at the same time. If you use a foreign mail server, you can set this option to 1.
• In the Receiving Options, set the Channels to Use option. This option limits the number of incoming SMTP connections the SMTPGate can accept at the same time. Other hosts will connect to your host via SMTP if your systems acts as an SMTP mail server. If you use a network provider, consult with them if you can get your mail via SMTP or if you should use the POPGate (see above). If mail comes to your CommuniGate Server via UUCP only, or if you have to use a foreign POP server(s) to get your mail, set the Channels to Use option to zero.
When the maximum number of incoming channels is set to non-zero, then:
a) if the Server computer is running MacTCP, several "empty" lines appear in the SMTPGate monitor window: they represent TCP streams waiting for incoming connections.
b) if the Server computer is running Open Transport, an icon appears in the top part of the window indicating that a listener socket has been created. This socket is used to receive incoming connections under Open Transport.
• In the Receiving Options, set the wake-up parameters (see above). If your Server has a full-time (permanent) Internet connection, select the Wait for Connection option.
• Set the log level.
Note: if you select the "All Info" log level, log files will become very large very soon and the system may operate slowly when a SMTP connection is active.
Troubleshooting
If you see that the SMTPGate tries to connect to a host, but fails, or it cannot negotiate with that host, switch the log level to "Low-Level Info" or "All Info". After the next attempt, switch logging back and examine the log. If you still cannot find the source of the problem, and the administrator of that host cannot help either, copy that part of the log and e-mail it to support@stalker.com with the detailed description of the problem as you see it. Include the information about the versions of your CommuniGate Server and SMTPGate (use the About CommuniGate command from the Apple menu of the CommuniGator application).
Routing
The SMTPGate module is always used as the link to the "rest of the world", i.e. if a message cannot be routed to other modules, and the domain name of the recipient contains dots, the message is routed to the SMTPGate. Also, all messages with the domain name ending with ".smtp" are routed to the SMTPGate module (with the ".smtp" suffix removed).
The SMTPGate module recognizes the domain "[xx.yy.zz.tt]", where xx.yy.zz.tt is the IP address of your machine, so your system can accept messages even if they were sent using the [xx.yy.zz.tt] notation rather than domain names.
Revision History
2.0
• Complete redesign of the low-level communication submodule, native OpenTransport implementation (if the OpenTransport TCP is installed).
• Support for DNR searches (when working under OpenTransport) in addition to the "Foreign
mail server" operation mode.
• Queue management changed to employ the CommuniGate Server 2.4 routines.
• Detailed error reporting (now includes the receiving server error messages).
1.7
• Support for RFC1425 (ESMTP) and RFC1985(Remote Queue Starting) is implemented.
1.6
• Redesign of MacTCP reading scheme.
1.5.
• The stream processing has been changed to deal with a set of MacTCP bugs.
• The speed is improved under OpenTransport, and it should be at least as fast under old MacTCP as the version 1.3 was (1.4 was extremely slow under old MacTCP in most of cases).
1.4.
• The wake-up options are implemented to allow receiving mail via SMTP using dial-up links.
• High-priority messages force the Server to establish TCP/IP Links immediately, ignoring the TCP/IP activity schedule.
1.3.
• The CommuniGate Server 2.0 services (MIME, codings, etc) are supported now.
• Mail Coding option is removed (it is in the General Server Settings now).
1.2.1
• Addresses in form of [xx.yy.zz.tt], where xx.yy.zz.tt is the local IP address are processed correctly now.
1.2
• Dial-up links are supported now, the "Sleep Time" option is gone.
• Addresses in form of ip-addresses [xx.yy.zz.tt] are processed properly now.
• Error reporting is improved.
• Bug that caused failures with the -43 error code is fixed
1.1
• The "Sleep Time" option is implemented to support dial-up links.
• Internal changes to allow the SMTPGate to work with Open Transport TCP/IP.
1.0.3
• MacTCP session closing procedure has been changed to improve stability.
• MAIL From: command generating is fixed to avoid "From address rejected" errors.
1.0.2
• MacTCP access scheme has been changed to improve stability and to fix the
problem that resulted in connection failures for various hosts.
1.0.1
• Fixed the Network Coding processing: when this option was set to None, messages
were decoded using a table that did not exist in reality.